package com.brillilab.dao.mapper.inventory;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.brillilab.domain.po.experiments.ExperimentStepReagent;
import com.brillilab.domain.po.inventory.ReagentInventory;
import com.brillilab.domain.vo.inventory.ReagentInventoryWithOwner;
import com.brillilab.domain.vo.inventory.SpaceInventoryPaged;
import com.brillilab.domain.vo.kit.DeviceUnlock;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author wuzhiyu
 * @Title: ReagentInventoryMapper
 * @ProjectName brill_lab
 * @Description: TODO
 * @date 2018/11/1420:08
 */
public interface ReagentInventoryMapper extends BaseMapper<ReagentInventory> {
    Integer saveInventoryList(List<ReagentInventory> list);

    Integer changBoxInventory(ReagentInventory inventory);

    Integer updateListInventoryPosition(List<ReagentInventory> list);

    List<ReagentInventoryWithOwner> getSpaceInventoryPaged(@Param("labId") Long labId, @Param("search") SpaceInventoryPaged search);

    Integer updateInventoryListAmount(List<ReagentInventory> list);

    List<ReagentInventory> getInventoryCountByKitSpec(@Param("kitId") Long kitId, @Param("kitSize") BigDecimal kitSize);

    Integer deleteInventoryByKitSpec(@Param("kitId") Long kitId, @Param("kitSize") BigDecimal kitSize);

    List<ReagentInventory> getSampleGroupInventoryList(@Param("sampleGroupId") Long sampleGroupId, @Param("labMemberId") Long labMemberId);

    Integer deleteBatch(@Param("ids") List<Long> ids);

    List<ReagentInventory> selectListByIds(@Param("inventoryIds") List<Long> inventoryIds, @Param("isDelete") Integer isDelete);

    Integer updateOwnerByPanelId(@Param("panelId") Long panelId, @Param("labMemberId") Long labMemberId);

    Integer changMoveBoxInventory(ReagentInventory newInv);

    List<DeviceUnlock> selectKitUsageDeviceUnLockList(@Param("ids")List<Long> inventoryIds);

    List<ReagentInventory> selectByStepReagents(@Param("items") List<ExperimentStepReagent> stepReagents);
}
